﻿package mortal.game.scene3D.fight
{
    import Message.DB.Tables.*;
    import mortal.game.resource.tableConfig.*;

    public class FightEffectLeadRelease extends FightEffectBase
    {
        protected var skillModel:TSkillModel;

        public function FightEffectLeadRelease()
        {
            return;
        }// end function

        override public function runStart() : void
        {
            super.runStart();
            this.skillModel = SkillModelConfig.instance.getInfoById(_skill.skillModel);
            if (!this.skillModel)
            {
                runFinish();
                return;
            }
            var _loc_1:Boolean = false;
            this.targetHandler();
            return;
        }// end function

        protected function targetHandler() : void
        {
            if (this.skillModel.targetModel)
            {
                if (_targetPoint && _isNotShildEffect)
                {
                    SkillEffectUtil.addPointEffect(_targetPoint, this.skillModel.targetModel, _isFromRolePlayer, 0, layer);
                }
                else if (_targetPlayer && _isNotShildEffect)
                {
                    SkillEffectUtil.addPlayerEffect(_targetPlayer, this.skillModel.targetModel, true, _isFromRolePlayer);
                }
            }
            runFinish();
            return;
        }// end function

        override public function dispose() : void
        {
            super.dispose();
            this.skillModel = null;
            return;
        }// end function

    }
}
